﻿var status = 0;
var choice;
var scrolls = Array(

Array("冒险岛电动缆车椅子", 3015328, 8000000),
Array("哗啦啦大水车", 3015304, 8000000),
Array("七彩摩天轮", 3015002, 8000000),
Array("心花怒放椅子", 3010853, 8000000),
Array("大象跷跷板椅子", 3016000, 8000000),
Array("太阳椅子", 3010832, 8000000),
Array("大黄鸭", 3010696, 6000000),
Array("巨无霸年夜饭椅子", 3010788, 6000000),
Array("蛤蛤仙人椅", 3010621, 6000000),
Array("夏日西瓜冰椅子", 3010658, 6000000), 
Array("巨无霸年夜饭", 3010417, 6000000),
Array("迷你玩具别墅椅子", 3010820, 4000000),
Array("一杯咖啡的悠闲", 3010894, 4000000),
Array("巨无霸白雪人", 3010416, 2000000),
Array("巨无霸企鹅王", 3010417, 2000000),
Array("紫蛙蛙滑梯椅子", 3015272, 400000),
Array("粉蛙蛙滑梯椅子", 3015236, 400000),
Array("黄蛙蛙滑梯椅子", 3015263, 400000),
Array("和你在一起椅子 ", 3012030, 400000),
Array("妖怪坛椅子", 3015329, 400000),
Array("宇宙冲撞椅", 3015029, 400000),
Array("捕获僵尸拍立得", 3015344, 400000),
Array("僵尸猎人椅子", 3015329, 400000),
Array("农夫的乐园椅子", 3015312, 400000),
Array("秘密花园椅子", 3015338, 400000),
Array("梦幻水晶球椅子", 3015224, 400000),
Array("少年的海滩派对", 3015234, 400000),
Array("冒险岛的砖头朋友们", 3010744, 400000),
Array("小幽灵卡斯帕", 3010719, 400000),
Array("安德洛墨达椅子", 3015027, 400000),
Array("圣诞节幻樱椅", 3010584, 400000),
Array("纸箱里“求领养”", 3010169, 400000),
Array("冰城堡椅子", 3010838, 400000),
Array("麻辣教室椅子", 3010844, 400000),
Array("雪人香波椅子", 3010739, 400000),
Array("小鸡弹簧床椅子", 3012025, 400000),
Array("森林伙伴野营椅子", 3010946, 400000),
Array("新兔兔郊游房车", 3010843, 400000),
Array("羊羊幻想牧场椅子", 3015096, 400000),
Array("巨无霸品克缤", 3010070, 400000),
Array("巨无霸国际巨星", 3015051, 400000),
Array("噜噜啦啦印第安小孩", 3015158, 400000),
Array("奥尔卡的布偶兔椅子", 3015100, 400000),
Array("花幻想曲椅子", 3015109, 400000),
Array("青蛙跳楼机", 3010936, 400000),
Array("白色天堂椅子", 3015129, 300000),
Array("萌宠下午茶杯椅子", 3012028, 300000),
Array("和大象一起自拍椅子", 3015225, 300000),
Array("蝶恋花椅子", 3015182, 300000),
Array("喷泉", 3015274, 300000),
Array("惩戒之月妙椅子", 3010704, 300000),
Array("爱情水晶球的回忆", 3010813, 30000),
Array("五彩缤纷花车巡游椅", 3015058, 300000),
Array("闪耀冒险岛椅", 3015197, 300000),
Array("贵族的花船椅子", 3015144, 300000),
Array("巨大彩色金鱼标本椅子", 3015143, 300000),
Array("被驯服的鲸鱼椅子", 3015193, 300000),
Array("绿水灵背景椅子", 3015183, 300000),
Array("萤火之森椅子", 3015178, 300000),
Array("武士精神椅子", 3015142, 300000),
Array("仲夏夜之梦椅子", 3015181, 300000),
Array("新年招财猫椅子", 3010756, 300000),
Array("大自然椅子", 3015075, 300000),
Array("羊羊热气球椅子", 3012027, 300000),
Array("旋转花茶杯情侣椅子", 3010494, 300000),
Array("你和我", 3010757, 300000),
Array("千钧一发！", 3015014, 300000),
Array("巨大鼻涕泡椅子", 3015131, 300000),
Array("幸福9周年蛋糕气球椅", 3010715, 300000),
Array("初恋云朵朵沙发", 3010718, 300000),
Array("新动物英雄团椅子", 3010737, 200000),
Array("爱琴海椅子", 3012019, 200000),
Array("和克里姆共享下午茶", 3010578, 200000),
Array("梦幻公主城堡椅子", 3010660, 200000),
Array("皇宫盛宴椅子", 3010984, 200000),
Array("家庭聚餐椅子", 3010983, 200000),
Array("雪人椅子", 3010767, 200000),
Array("古代浴池椅子", 3010760, 200000),
Array("古代战车椅子", 3010761, 200000),
Array("猫咪针线篮椅子", 3010510, 200000),
Array("实验室椅子", 3010688, 200000),
Array("双子塔", 3010412, 200000),
Array("欢乐相框椅子", 3010661, 200000),
Array("献出心脏的敬礼", 3015008, 200000),
Array("鲤鱼椅", 3015097, 200000),
Array("海加顿之安息", 3010678, 200000),
Array("新金马祥云轿", 3010779, 200000),
Array("新抖动的舌头椅子", 3010794, 200000),
Array("新堆王冠椅子", 3010714, 200000),
Array("新桃樱芳菲椅", 3010806, 200000),
Array("诺勒特斯椅子", 3010286, 200000),
Array("噢我的女皇", 3010318, 200000),
Array("埃欧雷的小音乐会", 3010403, 200000),
Array("天使舞台椅", 3010459, 200000), 
Array("水晶花园椅", 3010400, 200000),
Array("熟睡的鸭子椅", 3010415, 200000), 
Array("彩虹椅子", 3015259, 100000),
Array("彩虹椅子", 3015260, 100000),
Array("彩虹椅子", 3010362, 100000),
Array("兔子乘风椅", 3010453, 100000),
Array("西甘锡纳地区沦陷", 3015010, 100000),
Array("天王星椅子", 3010830, 100000),
Array("海王星椅子", 3010831, 100000),
Array("火星椅子", 3010827, 100000),
Array("地球椅子", 3010826, 100000),
Array("土星椅子", 3010829, 100000),
Array("木星椅子", 3010828, 100000),
Array("水星椅子", 3010824, 100000),
Array("金星椅子", 3010825, 100000),
Array("冥王星椅子", 3010944, 100000),
Array("冒险岛世界椅子", 3010964, 100000),
Array("潮流评论家椅子", 3010494, 100000),
Array("温泉奥拉夫椅子", 3010837, 100000),
Array("杜鹃花椅子", 3010456, 100000),
Array("鱼尾狮椅子", 3010411, 100000),
Array("贝勒德椅子", 3010698, 100000),
Array("贝勒德头部椅子", 3010699, 100000),
Array("传说中的狮兽椅子", 3015046, 100000),
Array("焰火椅子", 3010798, 100000),
Array("圣诞花环椅子", 3015037, 100000),
Array("甜蜜的圣诞椅子", 3010296, 100000),
Array("翅膀自行车椅子", 3010732, 100000),
Array("和风纸鸢椅子", 3010747, 100000),
Array("金字塔椅子", 3010743, 100000),
Array("汉谟拉比法庭椅子", 3010742, 100000),
Array("闪电三人组椅子", 3010738, 100000),
Array("けいおん！", 3013001, 100000),
Array("威尔士柯基犬椅子", 3010524, 100000),
Array("白鹳飞行员椅子", 3010526, 100000),
Array("奇石椅子", 3010515, 100000),
Array("案件聚焦椅子", 3014004, 100000),
Array("南国度假信息椅子", 3014006, 100000),
Array("了不得的玩具椅子", 5530613, 100000),
Array("布莱克缤椅子", 3010592, 100000),
Array("杜鹃花椅子", 5532110, 100000),
Array("我爱蛋糕椅子", 3010221, 100000),
Array("我爱馅饼椅子", 3010220, 100000),
Array("月妙和水灵椅子", 3010705, 100000),
Array("诺特勒斯椅子", 3010286, 100000),
Array("被蛋卷椅子", 3015080, 100000),
Array("扎纳罗非伪装椅子", 3015099, 100000),
Array("压岁钱万岁！", 3015047, 100000),
Array("新Marry me椅子", 3010717, 100000),
Array("新森林中休息处椅子", 3010795, 100000),
Array("新惊人漫画椅子", 3014000, 100000),
Array("新蓝蓝波尼小屋椅子", 3010783, 100000),
Array("新进化椅子", 3010664, 100000),
Array("新满目韩文椅子", 3010708, 100000),
Array("罗曼蒂克天文台", 3010462, 100000),
Array("爱心云朵椅", 3010454, 100000),
Array("深海章鱼", 3010527, 100000), 
Array("新浪漫长椅", 3010735, 100000),
Array("猫咪公园椅子", 3010511, 100000), 
Array("大红灯笼椅", 3010495, 100000),
Array("蘑菇朋友椅子", 3010423, 1000000),
Array("怪蜀黍的泄愤桌", 3010620, 100000), 
Array("不是在做梦", 3010609, 100000),
Array("漫画书椅子", 3010591, 100000),
Array("蛇椅子", 3010583, 100000),
Array("周年庆水晶枫叶椅", 3010145, 100000),
Array("精灵王座", 3010287, 100000),
Array("希拉的梳妆椅", 3010404, 100000),
Array("小幼龙椅子", 3010299, 50000), 
Array("兔子纪念版椅子", 3010053, 50000), 
Array("我爱巧克力火锅", 3012011, 50000), 
Array("巧克力蛋糕恋人", 3012010, 50000),
Array("HP椅子", 3010180, 50000), 
Array("MP椅子", 3010181, 50000), 
Array("无价之宝椅子", 3010195, 50000), 
Array("水果椅子", 3010280, 50000), 
Array("水族馆椅子", 3010142, 50000),
Array("外形钻机椅子", 3010355, 50000),
Array("粉色扎昆椅子", 3010313, 50000),
Array("痊愈椅子", 3010449, 50000),
Array("海盗的俘虏", 3010028, 50000),
Array("浴桶", 3012002, 50000), 
Array("呼噜呼噜床", 3010054, 50000), 
Array("财神椅子", 3010100, 50000), 
Array("中秋柿子树枝", 1702551, 50000),
Array("樱花树下", 3013000, 50000),
Array("雪狼战椅", 3010106, 50000), 
Array("雏祭娃娃3", 3010605, 50000),
Array("雏祭娃娃2", 3010604, 50000),
Array("雏祭娃娃1", 3010603, 50000),
Array("浪漫秋千", 3010036, 50000),
Array("龙龙蛋壳椅", 3010107, 50000),
Array("露水椅子", 3010068, 50000),
Array("舒适大白熊椅子", 3010110, 50000),
Array("无人岛椅子", 3010151, 50000),
Array("藏獒椅子", 3010212, 50000),
Array("小金猪椅子", 3010845, 50000),
Array("粉色扎昆椅子", 3010313, 50000),
Array("摇滚之魂椅子", 3010116, 50000), 
Array("兔子纪念版椅子", 3010053, 50000),
Array("节日独角兽椅子", 3010135, 50000),
Array("贪吃鳄鱼椅子", 3010822, 50000),
Array("蘑菇智能手表椅子", 3010823, 50000),
Array("艾丽莎的双膝", 3010410, 10000),
Array("幻影卡牌椅", 3010401, 10000),
Array("世界末日", 3010058, 10000), 
Array("骷髅宝座", 3010041, 10000), 
Array("帐篷", 3010133, 50000), 
Array("情书柜子", 3010112, 10000),
Array("糖果音符椅子", 3010118, 10000),
Array("都纳斯喷气椅子", 3010124, 10000),
Array("老奶奶读童话椅子", 3010320, 10000), 
Array("猫头鹰椅子", 3010077, 10000),
Array("风吹稻香", 3010085, 10000), 
Array("暖暖桌", 3010021, 10000), 
Array("奶黄包", 3010055, 10000), 
Array("电视宅人", 3010098, 10000), 
Array("跑步机椅子", 3010528, 10000),
Array("小苹果椅子", 3015009, 10000),
Array("电视椅子", 3010733, 10000),
Array("军团长椅子", 3010657, 10000), 
Array("夏日喵喵椅子", 3010431, 10000), 
Array("大熊猫椅子", 3010078, 10000),
Array("蛋糕椅子", 3010141, 10000), 
Array("肥猫猫椅子", 3010079, 10000),
Array("TV椅子", 3010494, 10000),
Array("绵羊酋长椅子", 3010219, 10000),
Array("月光仙子椅子", 3010226, 10000),
Array("动物之家椅子", 3010281, 10000),
Array("鬼娃娃椅子", 3010085, 10000), 
Array("漂漂猪椅子", 3010094, 10000), 
Array("北极熊椅子", 3010099, 10000), 
Array("圣诞树椅子", 3010048, 10000), 
Array("虎虎生威椅子", 3010111, 10000), 
Array("魔法书椅子", 3010117, 10000), 
Array("暖炉椅", 3010292, 10000), 
Array("美容椅子", 3010357, 10000),
Array("雪糕丸子椅", 3010055, 10000), 
Array("七夕椅子", 3010144, 10000), 
Array("龙神椅子", 3010137, 10000), 
Array("星空椅子", 3010172, 10000),
Array("胡萝卜椅子", 3010183, 10000),
Array("兔子椅子", 3010186, 10000), 
Array("古老录音机椅子", 3010205, 10000), 
Array("喧闹好友椅子", 3010207, 10000),
Array("珍珠蚌椅子", 3010288, 10000),
Array("鬼节南瓜椅子", 3010279, 10000),
Array("黑猫椅子", 3010208, 10000), 
Array("雪夜椅子", 3010170, 10000), 
Array("水晶椅子", 3010428, 10000)
);

function start() {
    status = -1;
    action(1, 0, 0);
}

function action(mode, type, selection) {
    if (mode == -1) cm.dispose();
    else {
        if (status == 0 && mode == 0) {
            cm.dispose();
            return;
        } else if (status >= 1 && mode == 0) {
            cm.sendOk("好吧，欢迎下次继续光临！.");
            cm.dispose();
            return;
        }
        if (mode == 1) status++;
        else status--;

        if (status == 0) {
            choices = "\r\n点卷：#r" + cm.getPlayer().getCSPoints(1) + "#k (#r买后不支持退货哟亲#k)";
            for (var i = 0; i < scrolls.length; i++) {
                choices += "\r\n#L" + i + "##v" + scrolls[i][1] + "##z" + scrolls[i][1] + "#　#d需要#r" + scrolls[i][2] + "#d点卷#k#l";
            }
            cm.sendSimpleS("欢迎来到兔花花椅子店,你想买我们商店的物品么?请选择吧：." + choices,2);
        } else if (status == 1) {
            cm.sendYesNo("你确定要购买#v" + scrolls[selection][1] + "##t" + scrolls[selection][1] + "#?");
		choice = selection;
        } else if (status == 2) {
            var money = scrolls[choice][2];
            if (cm.getPlayer().getCSPoints(1) < money) {
                cm.sendOk("抱歉，你没足够的点卷！");
                cm.dispose();
            } else {
                cm.gainNX(-money);
                cm.gainItem(scrolls[choice][1], 1);
                cm.sendOk("购买成功.");
                cm.dispose();
            }
        }
    }
}
